﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Web.Mvc;
using System.ComponentModel;
using Uco.Infrastructure;
using System.Xml.Serialization;

namespace Uco.Models
{
    public class TextComponent
    {
        [Key]
        [HiddenInput]
        public int ID { get; set; }
        [Display(Name = "SystemName", ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string SystemName { get; set; }

        [Display(Name = "Text", ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        [UIHint("Html")]
        [AllowHtml]
        public string Text { get; set; }
    }

    public class Settings
    {
        [Display(Name = "AdminEmail", Order = 50, ResourceType = typeof(Uco.Content.Resources.SystemModels), Prompt = "TabSettings")]
        [Required(ErrorMessageResourceName = "AdminEmailRequired", ErrorMessageResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string AdminEmail { get; set; }

        [Display(Name = "LanguageRTL", Order = 40, ResourceType = typeof(Uco.Content.Resources.SystemModels), Prompt = "TabSettings")]
        public bool LanguageRTL { get; set; }

        [Display(Name = "HeaderHtml", Order = 60, ResourceType = typeof(Uco.Content.Resources.SystemModels), Prompt = "TabSettings")]
        [DataType(DataType.MultilineText)]
        [AllowHtml]
        public string HeaderHtml { get; set; }
        
        [Display(Name = "FotterHtml", Order = 70, ResourceType = typeof(Uco.Content.Resources.SystemModels), Prompt = "TabSettings")]
        [DataType(DataType.MultilineText)]
        [AllowHtml]
        public string FotterHtml { get; set; }
        
        [Display(Name = "Footer", Order = 80, ResourceType = typeof(Uco.Content.Resources.SystemModels), Prompt = "TabSettings")]
        [UIHint("Html")]
        [AllowHtml]
        public string Footer { get; set; }

	
		[Display(Name = "Error404", Prompt = "Error404")]
        [AllowHtml()]
        [DataType(DataType.MultilineText)]
        public string Error404 { get; set; }
    }

    public class Contact
    {
        [Key]
        public int ID { get; set; }
        [Display(Name = "Date", Order = 10, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public DateTime ContactDate { get; set; }

        [Display(Name = "Name", Order = 20, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string ContactName { get; set; }
        
        [Display(Name = "Email", Order = 30, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string ContactEmail { get; set; }

        [Display(Name = "Phone", Order = 40, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string ContactPhone { get; set; }

        [Display(Name = "Content", Order = 50, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        [UIHint("Html")]
        [AllowHtml]
        public string ContactData { get; set; }

        [Display(Name = "Url", Order = 60, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        [AllowHtml]
        [UIHint("Html")]
        public string ContactUrl { get; set; }

        [Display(Name = "Referal", Order = 70, ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        public string ContactReferal { get; set; }
    }


    public class GalleryBanner
    {
        [Key]
        [HiddenInput(DisplayValue = false)]
        public int ID { get; set; }

        [Display(Name = "Title", Order = 10, Prompt = "TabData", ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        [Required(ErrorMessageResourceType = typeof(Uco.Content.Resources.SystemModels), ErrorMessageResourceName = "TitleRequired")]
        public string Title { get; set; }

        [Display(Name = "Pictures", Order = 400, Prompt = "TabData", ResourceType = typeof(Uco.Content.Resources.SystemModels))]
        [UIHint("Gallery")]
        public virtual string Gallery { get { return "Gallery/GalleryBanner_" + this.ID; } }
    }
}